package com.ghost.alibabaghost.result;

/**
 * @author yaolisheng
 * @version 1.0
 * @date 2022/1/9 12:25 AM
 */
public class Result {

    private Code code;

    private String message;

    public int getCode() {
        return code.getStatus();
    }

    public void setCode(Code code) {
        this.code = code;
    }

    public String getMessage() {
        return message != null?message:code.getMessage();
    }

    public void setMessage(String message) {
        this.message = message;
    }


    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}

